<%include("/common/list-top.html",{title:"test",css:[
ctxPath + "/zui/dist/lib/datatable/zui.datatable.min.css", 
ctxPath + "/ztree/css/metroStyle.css"
]}){} %>

<!-- <div style="margin:50px;height: 100px;width: 200px;padding: 10px;border:1px solid #eee">
<input class="f4" type="text" id="product" commitFormat="name"  table="test" displayFormat="name" urlParams=''/>
</div> -->

<div style="margin:50px;height: 100px;width: 200px;padding: 10px;border:1px solid #eee">
	<input class="f4" type="text" id="materiel"table="getMaterielCodeByCompanyId"  
	commitFormat="materielCode"  displayFormat="materielName" urlParams=''/>
	<button id="btntest">点我</button>
</div>
<div>
<button id="initCode">编码规则初始化</button>
</div>
<div style="height: 50px"></div>


<div class="modal fade" id="testModal">
	<div class="modal-dialog" style="width: 500px;">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal">
					<span aria-hidden="true">×</span><span class="sr-only">关闭</span>
				</button>
				<h4 class="modal-title">添加</h4>
			</div>
			<div class="modal-body">
			<input class="f4tree" id="product_class22222" data-height="300" data-table="test" value='${productClass!}'/>
			</div>
		</div>
		<div class="modal-footer">
			<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
			<button type="button" class="btn btn-primary" id="ok">确定</button>
		</div>
	</div>
</div>

 
<div class="input-group">
  <span class="input-group-addon"><i class="icon icon-plus"></i></span>
  <input style="margin:0px;padding:0px;size:2"  type="number" class="form-control" placeholder="0">
  <span class="input-group-addon"><i class="icon icon-minus"></i></span>
</div>

<div class="input-group">
        <span class="input-group-addon"><i class="icon-search"></i></span>
        <input type="text" class="form-control">
        <span class="input-group-btn">
          <button class="btn btn-default" type="button">搜索</button>
        </span>
      </div>

<div style="margin-left:250px;height: 100px;width: 200px;padding: 10px;border:1px solid #eee">
<input class="f4tree" id="product_class" data-height="300" data-table="test" value='${productClass!}'/>
</div>
<div style="height: 50px"></div>
<div id="code"></div>  
<script>  
    //任意字符串 生成二维码  
    //默认使用Canvas画图  
    $(function(){
	    $('#code').qrcode('https://www.baidu.com/');  
    })
</script>  
<script type="text/javascript">
 $(function(){
	$("[table='getMaterielCodeByCompanyId']").attr('urlParams','{companyId:111}')
})

$("#btntest").on('click',function(){
	$("#testModal").modal({'show':true})
});
 
 //编码规则初始化
 $('#initCode').on('click',function(){
	 $.post($('body').attr('ctxPath')+'/test/initCodingRule?_t='+new Date().getTime(),function(data){
		 if(data.flag){
			 layer.alert(data.msg);
			 return;
		 }else{
			 layer.alert(data.msg);
			 return;
		 }
	 });
 });

</script>

<%include("/common/list-bottom.html",{js:[
ctxPath + "/zui/dist/lib/datatable/zui.datatable.min.js", 
ctxPath + "/ztree/js/jquery.ztree.all.min.js", 
ctxPath + "/js/plugin-f4.js", 
ctxPath + "/js/plugin-f4tree.js",
ctxPath + "/js/jquery.qrcode.min.js"]}){} %>
